﻿using System;
using System.Web;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
namespace AnyOffice.general.system.workflow.flow_form
{   
    public partial class form_delete : ModulePage
    {        

        protected void Page_Load(object sender, EventArgs e)
        {
            int num = (Request.QueryString["form_id"] == null) ? 0 : int.Parse(Request.QueryString["form_id"].ToString());
            FlowFormTypeDao dao = new FlowFormTypeDao();
            if (dao.Delete(base.Conn, num))
            {
                this.litMessage.Text = base.ShowPrompt("表单删除成功!", "index.aspx");
            }
            else
            {
                this.litMessage.Text = base.ShowPrompt("该表单已被相关流程使用，请先删除相关流程再删除表单！", "index.aspx");
            }
        }
        
    }
}

